package com.vend.user.home

import android.os.Bundle
import com.alibaba.android.arouter.facade.annotation.Route
import com.alibaba.android.arouter.launcher.ARouter
import com.vend.common.base.BaseActivity
import com.vend.common.constant.RouterConstant
import com.vend.common.mvp.IPresenter
import com.vend.user.R
import kotlinx.android.synthetic.main.activity_user_home.*


/**
 * Created by glendal on 2022/01/25.
 * 此类是专门来装载一个
 * 方便非组件化的时候的处理
 */
@Route(path = RouterConstant.USER_HOME_ACTIVITY)
class UserHomeActivity: BaseActivity<IPresenter>() {
    override fun getContentLayoutId(): Int {
       return R.layout.activity_user_home
    }

    override fun initView(savedInstanceState: Bundle?) {
        user_show.setOnClickListener {
            ARouter.getInstance().build(RouterConstant.USER_LOGIN_ACTIVITY).navigation()
        }
//         addUserFragment()
    }

//    /**
//     * 在Activity中装载UserFragment
//     */
//    private fun addUserFragment(){
//        supportFragmentManager //
//            .beginTransaction()
//            .add(
//                R.id.fragment_layout,
//                UserFragment()
//            ) // 此处的R.id.fragment_container是要盛放fragment的父容器
//            .commit()
//    }
}